package com.aaron.study.customer.feign;

import java.util.ArrayList;
import java.util.List;

import com.aaron.study.common.entity.TextMessage;
import org.springframework.stereotype.Component;

/**
 * 客服服务降级 <br>
 * Date: 2018/1/23 <br>
 * Time: 0:03 <br>
 *
 * <a href="https://gitee.com/aaronsd/spring-cloud-security/">spring-cloud-security</a>
 *
 * @author <a href="mailto:610195979@qq.com?subject=com.aaron.study.spring-cloud-security">aaron</a>
 * @version 0.0.1
 */
@Component
public class KeFuClientFallBack implements KeFuFeignClient {

	@Override
	public TextMessage send2Kefu(TextMessage textMessage) {
		TextMessage callback = new TextMessage();
		callback.setMessage("FeFuClientFallBack.服务降级");
		callback.setFromUser("FeFuClientFallBack.callback");
		return callback;
	}

	@Override
	public List<String> getKeFu() {
		List<String> list = new ArrayList<>(1);
		list.add("FeFuClientFallBack.callback.服务降级");
		return list;
	}
}
